class ConfigError(Exception):
    """配置相关异常基类"""
    pass

class InvalidDeviceError(ConfigError):
    """无效设备异常"""
    def __init__(self, requested: str, available: str):
        super().__init__(
            f"Requested device {requested} but only {available} available"
        )
        self.requested = requested
        self.available = available